#ifndef SKINBUTTON_H
#define SKINBUTTON_H

#include <QWidget>
#include <QPaintEvent>
#include <QEvent>
#include <QPushButton>
#include <QColor>
#include <QPixmap>
#include <QMouseEvent>
#include <QTimer>

//三态图片按钮
class state3tbutton:public QPushButton
{
    Q_OBJECT
public:
    state3tbutton(QString pix_listurl,QWidget*parent);
    void setPixmap(QString pixnormal);
protected:
    void paintEvent(QPaintEvent *);
    void enterEvent(QEvent *);
    void leaveEvent(QEvent*);
    void mousePressEvent(QMouseEvent *e);
    void mouseReleaseEvent(QMouseEvent *e) override;
private:
    QList<QPixmap> m_pixlist;
    int m_index;
    bool m_enter;
    bool m_select;
public:
    void isSelect(bool b_select);
};


#endif // SKINBUTTON_H
